1. Field of the Invention
This invention relates to a servo motor control method designed to apply a certain amount of offset to the velocity command during the position loop control in order to prevent an irregular machined surface from being formed when the rotation of the servo motor is reversed in the middle of machining of a circular or arc-shaped surface while the feed shaft of a machine tool or the arm of a robot is controlled using a servo motor.
2. Description of the Prior Art
In carrying out an arc-shape cutting in a X-Y plane using a machine tool driven and controlled by an X-axis servo motor and a Y-axis servo motor, irregularity of the machined surface occurs when the machining progresses from one quadrant to the next quadrant, for example, from quadrant I (x&gt;0, y&gt;0) to the quadrant IV (x&gt;0, y&lt;0), quadrant III (x&lt;0, y&lt;0) and quadrant II (x&gt;0, y&lt;0) as shown in FIG. 8.
To describe the above-mentioned phenomenon with reference to FIG. 8, the direction of drive by the X-axis servo motor is changed from positive direction (rightward direction in FIG. 8) to negative direction (leftward direction in FIG. 8), while the direction of drive by Y-axis motor remains unchanged or continues in the negative direction (downward direction in FIG. 8). Thus, the Y-axis servo motor continues to drive at the same speed and in the same direction as the previous speed and direction. However, the X-axis servo motor has an X-axis positional deviation becoming zero, and, therefore, a torque command value becomes small. Furthermore, in the speed loop control, the inversion of the sign of an integrator is delayed. The servo motor is subjected to a frictional resistance and therefore cannot immediately reverse its rotational direction. In addition, a table has backlash of a feed screw of the table; thus, the table is also unable to start shifting immediately in the opposite direction. For the reasons described above, the table cannot follow the shift command with respect to the shift movement in the direction of X axis, and this causes protrusions to be formed on a cut surface as shown by "p" in FIG. 8.
For preventing the formation of such protrusion, Japanese Patent Application Laid-Open KOKAI 4-8451 proposes a servo motor control, in which, when reversing the sign of shift command, a certain amount of offset is added to a speed command to increase the speed of the servo motor in reverse direction of rotation, thereby preventing the formation of the protrusion.
Furthermore, as disclosed in the Japanese Patent Application LAID-OPEN KOKAI 3-228106, already proposed is a method of automatically determining the amount of such an offset value for reversing the servo motor in accordance with an integral value of the integrator in the speed loop control given immediately before the servo motor reverse its direction. According to this method, the value of an integrator whose sign is reversed simultaneously with the reversal of the sign of the shift command is used as the after-reversal target value of the integrator, and the value obtained by subtracting the integral value of the integrator in each cycle of the speed loop processing from the above target value is added to the speed command so that the amount to be added is decreased gradually.
FIG. 1 is a block diagram showing a servo motor control such as the one disclosed in the Japanese Patent Application LAID-OPEN KOKAI 4-8451, wherein a certain amount of offset for reversing the servo motor is added to the speed command in order to accelerate the speed of the servo motor in its reverse direction of rotation when the sign of shift command is reversed. In the drawing, term 1 represents a position gain Kp used in the position loop control; term 2, an integral gain K1 used in the speed loop control; term 3, an integrator in the speed loop control; and term 4, a proportional gain K2 used in the speed loop control. Furthermore, term 5 is a transfer function of a servo motor, which is expressed in the simplified form of an integral term. Moreover, term 6 is a term of transfer function which integrates the speed of the servo motor to obtain the position. By the way, letter "S" in the drawing is representative of a Laplace operator.
In the servo motor control shown in this FIG. 1, subtracting position feedback value Pf from the position command Mcmd gives a positional deviation. Multiplying thus obtained positional deviation by the position gain Kp of the term 1 gives a speed command Vcmd. If the motor is in a normal operational condition being not given a shift command requiring reversion of the rotational direction of the motor, a motor actual speed v is subtracted from the speed command Vcmd to obtain a speed deviation. Thus obtained speed deviation is multiplied by the integral gain K1 and then is integrated (terms 2 and 3). The product (term 4) of the actual speed v and proportional gain K2 is subtracted from this integrated value to obtain the torque command (current command) Tcmd. Thus, the servo motor is driven by this torque command Tcmd. As the torque command Tcmd is identical with an acceleration command, integrating the torque command (term 5) gives the actual speed v of the servo motor. Further integrating the actual speed v (term 6) gives the position Pf of the servo motor.
When the sign of the position command Mcmd, i.e. shift direction of the command, is inverted, a predetermined amount of additional speed command for reversing the motor (i.e. an offset) Vmo is added to the above speed command Vcmd to correct the speed command to V'cmd (=Vcmd+Vmo), and, based on thus corrected speed command V'cmd, the integrator in the speed loop executes the processing for obtaining the torque command Tcmd, thereby eliminating the delay of the servo motor when reversing the rotational direction of the servo motor.
FIG. 2 is a view showing time-varying integral value of the integrator 3 in the speed loop control when the shift direction is reversed. FIG. 2(a) shows the condition of the integrator where the above-described correction (the offset Vmo) is not given to the speed command when the shift direction of the shift command is inverted.
The inversion of shift direction of the command causes inversion of sign of the positional deviation (Mcmd-Pf). And, in the processing of inverting the sign of the positional deviation, the positional deviation gradually decreases from a value of a certain sign (plus) to "0", and then it becomes to have a value of an opposite sign (minus). On the other hand, in the speed loop control, the value integrated until the time point (Rs) at which the direction of command is inverted will be maintained for a while without being reduced to "0" simultaneously with the reversal of the direction of the command. That is, even if the sign of the position command is inverted and the sign of the positional deviation is correspondingly inverted, the sign of an integral value of the integrator will not be inverted immediately. As illustrated in FIG. 2(a), the point Zr at which the integral value of the integrator becomes zero is considerably later than the time Ts.
FIG. 2(b) shows the time-varying integral value of the integrator in the speed loop control in the case where, as shown in FIG. 3(a), simultaneously with the inversion of the sign of the position command, a constant amount of offset Vmo is added during a predetermined period of time to the speed command Vcmd obtained in the position lop control processing in order to correct the speed command. As apparent from the comparison between FIG. 2(a) and FIG. 2(b), it is indicated that when the speed command is corrected by giving the motor-reversing offset Vmo, an integral value of the integrator in the speed loop invert its sign immediately following the time (Rs) of inversion of the shift command. Once the sign of an integral value of the integrator in the speed loop is inverted, the sign of the torque command Tcmd is correspondingly inverted. Hence, such a quick sign inversion of an integral value of the integrator in the speed loop enables the servo motor to quickly reverse the rotational direction thereof. By the way, at the time when the shift command is inverted, the motor speed is almost zero, and thus the absolute value of the speed is very small; therefore, the proportional term (the term 4 in FIG. 1) of the speed loop will not affect the torque command significantly.
According to the above known art, the speed command fed to the speed loop is corrected in the manner described above to reduce the delay of machines (table and tool) in following the shift command to be given just after the shift direction is inverted, thereby preventing the formation of the protrusions on an arc-shaped cut surface occurring during the transition of machining from one quadrant to another quadrant.
However, it is usual that a driving section of the servo motor and a driven section of the table or the like are connected with ball-bearing screws or the like; thus, their movements accompany backlash. For this reason, the table cannot immediately start reversing its direction even if the driving section of the servo motor starts reversing due to its backlash. That is, the table is stopped once before starting its reverse movement. The table is kept stopped during a time period through which the driving section on the side of the servo motor continues to move through the backlash region. Even after the driving section of the servo motor has completed its reverse movement within the backlash region, the stoppage will continue until the servo motor provides to the table a torque large enough to overcome a statical friction developed between the table and the machine surface so that the machine starts moving in the opposite direction. Thus, as long as the speed command to be given to the speed loop is corrected without taking adequate account of statical friction occurring between such driving section on the side of the servo motor and the table, still there is the possibility that such statical friction will cause the delay in the movement of the table and the resulting formation of the protrusions on the arc-shaped cut surface.
Hereinafter, the effect of backlash of the ball-bearing screw or the like will be explained with reference to FIG. 4. In FIG. 4, reference numeral 10 represents the driving section of the servo motor; reference numeral 11, a table driven by the servo motor; and reference numeral 12, a mechanical friction surface on which the table 11 slides. In FIG. 4, the driving section 10 of the servo motor continuously move the table 11 in one direction, i.e. from left to right (FIG. 4(a)). When the direction of the shift command is reversed, the driving section 10 of the servo motor moves through the region of backlash (FIG. 4(b)). Thereafter, the table 11 moves in the opposite direction (FIG. 4(c)). As shown in FIG. 4(b), the table 11 is stopped and held standstill during the time period through which the driving section 10 of the servo motor is moving through the backlash region after reversing its rotational direction. Thus, in order for the driving section 10 of the motor to move the table 11 in the opposite direction in the condition (c), it is necessary for the motor to exert on the table a force (torque) that causes the table to move against the statical friction. For this reason, it is necessary for starting the movement of the table to wait until the motor exerts a torque large enough to overcome the statical friction.
As described above, the conventional method of merely applying the motor reversing offset Vmo for correcting the speed command is not good enough for solving the delay in reverse movement which results from a static friction to be generated between the table and the machine surface, when starting to move the table, which was once stopped and then is at rest due to a backlash, in the reverse direction. In other words, it was not possible for the above-described conventional method to sufficiently suppress the occurrence of the protrusions on a machined surface.